package reflection;

import org.junit.Test;

import java.lang.reflect.Field;

//本类用于测试暴力反射
public class TestReflect {
    //创建单元测试方法测试
    @Test
    public void getFie() throws ClassNotFoundException {
        //通过暴力反射获取属性和操作属性
        Class<?> clazz = Class.forName("reflection.People");
        System.out.println(clazz);
        Field[] files = clazz.getDeclaredFields();
        for (Field field:files){
            System.out.println(field.getType());
        }


    }
}
